<extend name="./Application/Admin/View/Layout/application.html"/>
<block name="css">
    <style>
        #page2 {
            display: none;
        }
    </style>

</block>
<block name="content">
    <div class="row">
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">站点信息</h3>
                </div>
                <div class="panel-body">
                    <form class="form-horizontal" action="" method="post">
                        <div id="page1">
                            <div class="form-group">
                                <label for="title" class="col-sm-5 control-label">网站名称 <span class="badge"
                                                                                             style="background: green;">title</span></label>
                                <div class="col-sm-7">
                                    <textarea class="form-control" name="title" id="title" cols="50" rows="5">{{$site_info.title}}</textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="keyword" class="col-sm-5 control-label">关键词 <span class="badge"
                                                                                              style="background: orange;">keyword</span></label>
                                <div class="col-sm-7">
                                    <textarea class="form-control" name="keyword" id="keyword" cols="50" rows="5">{{$site_info.keyword}}</textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="description" class="col-sm-5 control-label">描述信息 <span class="badge"
                                                                                                   style="background: blue;">description</span></label>
                                <div class="col-sm-7">
                                    <textarea class="form-control" name="description" id="description" rows="5">{{$site_info.description}}</textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="icp" class="col-sm-5 control-label">ICP备案号</label>
                                <div class="col-sm-7">
                                    <input type="text" name="icp" value="{{$site_info.icp}}" class="form-control"
                                           id="icp">
                                </div>
                            </div>
                        </div>
                        <div id="page2">
                            <div class="form-group">
                                <label for="copyright_info" class="col-sm-5 control-label">版权信息</label>
                                <div class="col-sm-7">
                                    <input type="text" name="copyright_info" value="{{$site_info.icp}}"
                                           class="form-control"
                                           id="copyright_info">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="administrator" class="col-sm-5 control-label">管理员</label>
                                <div class="col-sm-7">
                                    <input type="text" name="administrator" value="{{$site_info.administrator}}"
                                           class="form-control" id="administrator">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="company" class="col-sm-5 control-label">公司名</label>
                                <div class="col-sm-7">
                                    <input type="text" name="company" value="{{$site_info.company}}"
                                           class="form-control"
                                           id="company">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="qq" class="col-sm-5 control-label">QQ</label>
                                <div class="col-sm-7">
                                    <input type="text" name="qq" value="{{$site_info.qq}}" class="form-control" id="qq">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="col-sm-5 control-label">电子邮箱</label>
                                <div class="col-sm-7">
                                    <input type="text" name="email" value="{{$site_info.email}}" class="form-control"
                                           id="email">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="phone" class="col-sm-5 control-label">手机</label>
                                <div class="col-sm-7">
                                    <input type="text" name="phone" value="{{$site_info.phone}}" class="form-control"
                                           id="phone">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="telephone" class="col-sm-5 control-label">固定电话</label>
                                <div class="col-sm-7">
                                    <input type="text" name="telephone" value="{{$site_info.telephone}}"
                                           class="form-control"
                                           id="telephone">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="fax" class="col-sm-5 control-label">传真</label>
                                <div class="col-sm-7">
                                    <input type="text" name="fax" value="{{$site_info.fax}}" class="form-control"
                                           id="fax">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-offset-9">
                            <div class="form-group">
                                <button type="button" class="btn btn-primary prev" disabled>后 退</button>
                                <button type="button" class="btn btn-primary next">前 进</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</block>

<block name="js">
    <script>
        $(function () {
            var page1 = $("#page1");
            var page2 = $("#page2");
            var prev = $(".prev");
            var next = $(".next");

            next.click(function () {
                if($(this).text() == "提 交") {
                    $("form").submit();
                }
                page1.hide(500);
                page2.show(500);
                prev.prop('disabled', 0);
                next.text("提 交");
            });
            prev.click(function () {
                page1.show(500);
                page2.hide(500);
                prev.prop('disabled', 1);
                next.text("前 进");
            });
        })
    </script>
</block>